export function searchColumns() {
  return [
    {
      type: 'select',
      prop: 'status',
      dicData: [
        { value: 1, label: '开启' },
        { value: 2, label: '禁用' },
      ],
      placeholder: '请选择状态',
    },
    {
      prop: 'account',
      placeholder: '请输入账号',
    },
  ]
}

export function tableColumns() {
  return [
    {
      width: '80px',
      label: '序号',
      prop: 'id',
    },
    {
      align: 'left',
      label: '账号主体',
      prop: 'account',
    },
    {
      width: '80px',
      label: '平台',
      prop: 'platform',
    },
    {
      label: 'CLIENT ID',
      prop: 'client_id',
    },
    {
      label: 'SECRET KEY',
      prop: 'secret',
    },
    {
      label: 'API地址',
      prop: 'paypal_url',
    },
    {
      width: '80px',
      label: '状态',
      prop: 'status',
      html: true,
      formatter: row =>
        `<span class="${row?.status === 1 ? 'text-success' : 'text-danger'}">${
          row?.status === 1 ? '开启' : '禁用'
        }</span>`,
    },
    {
      align: 'left',
      label: '备注',
      prop: 'remark',
    },
  ]
}
